global dbConn
if isempty(dbConn)   
    dbConn = createdbConn;
end


for i = 1: 20
    [ndata, text, alldata] = xlsread('sector.xlsx',i);
    n = size(text,1);
    
    for j = 2: n
        ticker = text{j,2};
        id = get_info_from_database('sec_id', ticker);
        if ~isnumeric(id)
            continue;
        end
        sql_str = sprintf('INSERT INTO `sector_security` VALUES (''%d'',''%d'') ',i,id) ;
        x = exec(dbConn, sql_str);
        x.Message
    end
%                 
end